Skip to content

Revert #169: park claude-set-token + dev-env OAuth activation#170

Merged
lmoresi merged 1 commit intodevelopmentfrom
bugfix/uw-revert-claude-set-token
May 5, 2026
Merged

Revert #169: park claude-set-token + dev-env OAuth activation#170
lmoresi merged 1 commit intodevelopmentfrom
bugfix/uw-revert-claude-set-token

Conversation

@lmoresi
Copy link
Copy Markdown
Member

@lmoresi lmoresi commented May 5, 2026

Summary

Reverts PR #169 (uw: add claude-set-token subcommand + dev-env activation for OAuth token).

After live-testing on a headless remote (hyperion), the feature turned out to over-promise relative to what Claude Code 2.x actually does with the OAuth env var:

CLAUDE_CODE_OAUTH_TOKEN is honoured only in non-interactive mode (claude -p "..." and scripted use). Bare/interactive claude always tries browser auth first regardless of the env var.

So on a truly headless box, our ./uw claude-set-token./uw shellclaude flow still results in a browser-login prompt the user can't service. The subcommand and its --help advertised a workflow that doesn't quite work, and was therefore potentially misleading. There is no current way to use Pro/Max OAuth for interactive Claude Code on a headless machine — the only options are claude -p (works with our env-var setup but loses the interactive REPL) or ANTHROPIC_API_KEY (works but routes through metered API credits, not subscription).

What this removes

  • ./uw claude-set-token subcommand + its --help block
  • claude-set-token line in ./uw --help Setup section
  • [feature.dev.activation] block in pixi.toml
  • scripts/activate-claude-auth.sh

What stays (unaffected)

Test plan

  • bash -n uw clean (verified locally)
  • No surviving references to claude-set-token or activate-claude-auth in uw or pixi.toml
  • scripts/activate-claude-auth.sh removed
  • CI green
  • ./uw --help no longer lists claude-set-token

Future

If a useful headless-auth workflow appears later (e.g. an ANTHROPIC_API_KEY-based path for interactive use that Pro/Max users are willing to pay for, or upstream Claude Code starts honouring the OAuth token in interactive mode), this can be revisited with honest documentation about which mode it serves.

Underworld development team with AI support from Claude Code

Reverts the changes introduced by PR #169 (`uw: add claude-set-token
subcommand + dev-env activation for OAuth token`). The feature
over-promised relative to what Claude Code 2.x actually does with
the OAuth env var:

  CLAUDE_CODE_OAUTH_TOKEN is honoured only in non-interactive mode
  (`claude -p "..."` and scripted use). Bare/interactive `claude`
  always tries browser auth first regardless. So on a truly headless
  remote, our `./uw shell` + persisted token flow still results in a
  browser-login prompt the user can't service. The subcommand and its
  --help advertised a workflow that doesn't quite work and was therefore
  potentially misleading.

What this revert removes:
- ./uw claude-set-token subcommand and its --help block
- claude-set-token entry in ./uw --help Setup section
- [feature.dev.activation] block in pixi.toml
- scripts/activate-claude-auth.sh

What stays (still earn their keep regardless of this auth quirk):
- ./uw install-claude (PR #167)
- ./uw shell (PR #168)

If a useful headless-auth workflow appears later (e.g. an
ANTHROPIC_API_KEY-based path for interactive use that Pro/Max users
are willing to pay for), this can be revisited with honest
documentation about which mode it serves.

Underworld development team with AI support from Claude Code (https://claude.com/claude-code)
Copilot AI review requested due to automatic review settings May 5, 2026 01:41
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR cleanly reverts the recently added Claude OAuth convenience flow from the repository’s uw environment wrapper and dev pixi environment. In the broader codebase, it narrows the developer tooling back to the supported install-claude, claude-perms, and ./uw shell flows after the reverted feature proved misleading for headless interactive use.

Changes:

  • Removes the ./uw claude-set-token subcommand implementation, help text, and command dispatch from uw.
  • Removes the claude-set-token entry from ./uw --help.
  • Removes the dev-environment activation hook from pixi.toml and deletes the supporting scripts/activate-claude-auth.sh script.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
uw Removes the reverted CLI subcommand, its help block, and its command registration.
scripts/activate-claude-auth.sh Deletes the token-export activation script introduced by the reverted feature.
pixi.toml Removes the dev feature activation stanza that sourced the deleted auth script.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@lmoresi lmoresi merged commit 17ef480 into development May 5, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants